﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace RazorPageSample.Pages.Blogs
{
    public class EditModel : PageModel
    {
        [BindProperty]
        public Blog Blog { get; set; }
        public void OnGet(int id)
        {
            Blog = new Blog(id,"gainorloss");
        }
        [HttpPost]
        public void OnPostEdit([FromBody]Blog blog)
        {
            Blog = new Blog();
        }
    }
}